<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<link rel="stylesheet" href="css/form.css" />
</head>

<body>
	<div id="header-wrap" data-mn="0"><!-- 
		<a href="###" data-link="register-2" data-type="ico" class="left ico-m ico-left"></a> -->
		<h2>注册赢本金</h2>
	</div>
	<div class="" id="">
		<div class="tips">
			<div class="t-info">设置登录密码</div>
			<div class="t-error"></div>
		</div>
		<form>
		<ul class="form-list">
			<li class="ico-m ico-pl ico-lock" data-type="ico">
				<div class="fl-cont form-input f-right-ico">
					<input id="pw_input" type="password" placeholder="请设置密码" />
					<a href="###" data-type="ico" class="ico-m ico-eye" id="check-pw"></a>
				</div>
			</li>
		</ul>
		<div class="">
			<a href="###" data-link="register-4" data-cookie="login,1,1" class="btn  b-red"><span id="check">完成注册 领1000元本金</span></a>
			<a href="###" class="btn b-link">您同意《51富贵用户服务协议》</a>
		</div>
		</form>
		
	</div>
	<script>
	$(function(){
		$("#check-pw").hover(
			function(){$(this).siblings("input").attr("type","text")},
			function(){$(this).siblings("input").attr("type","password")}
		)
		$("#check").on("click",function(){
			var pw_input = $("#pw_input").val();
			var id_temp = $.cookie("id_temp");
			var check_return = $("#pw_input").check({type:5})
			if(check_return == 0){
				$(".t-error").text("密码需要以字母开头，在6-18字符之间，只能包含字母、数字和下划线").fadeIn()
				reset_tip()
				return false
			}else{
				var mob = id_temp.match(/^\d{3}/)+"****"+id_temp.match(/\d{4}$/)
				$.cookie("user_id",id_temp)
				$.cookie("mobile",mob)
				$.cookie("user_pw",pw_input)
				$.cookie("id_temp","",{expires: -1})
			}
		})
	})
	</script>	
</body>

</html>
